<!DOCTYPE HTML>
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<title>Highcharts Example</title>

		<script type="text/javascript" src="../js/jquery.min.js"></script>
		<script type="text/javascript">
			function getUrlParam(name) { 
				var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); 
				var r = window.location.search.substr(1).match(reg); 
				if (r != null) 
				return unescape(r[2]); 
				return null; 
		} 
			$(function () {
		
       var options ={
            chart: {
            	renderTo: 'container',
            	type: 'pie'
            },
            title: {
                text: '结构分析',                
                style:{fontSize:'32px',fontWeight: 'bold'},
                useHTML:true
            },
            xAxis: {
                categories: ['Apples', 'Oranges', 'Pears', 'Bananas', 'Plums']
            },            
            series: [{}]
            
        };
         var url ="http://localhost:8085/tpif/dashboard/getChartData.action?FREQ_ID=00&DIM_VALUE_ID1=00000000&DATA_DATE=20130131&kpiGroupId="+getUrlParam("kpiGroupId")+"&categoryId="+getUrlParam("categoryId")+"&chartTypeId=1&chartId=chart0&analisisTypeId=00";
        	alert(url);
         $.ajax({
			        type : "post",
			        url:url,
			        data : {
			          
			           },
			        async : true,
			        dataType : "json",
			        success : function(json){
			        	alert(1);
			        	options.xAxis.categories=json.data.categoryNames;
					        options.series[0].data = json.data.datas;
					        var chart = new Highcharts.Chart(options);
			        }			       
    		});
        
    });
    

		</script>
	</head>
	<body>
<script type="text/javascript" src="../js/highcharts.js"></script>
<!--  <script src="../js/gray.js"></script>  -->

<div id="container" style="min-width: 310px; height: 400px; margin: 0 auto"></div>
<span>this is just a test</span>
	</body>
</html>
